/**
 * Copyright (c) 2008
 * Author: Heka Lok <heka.lok@gmail.com>
 * Author: David Feilen <bastian.mezurashii@gmail.com>
 *
 * Date: 15 June, 2008
 * Licence: MIT
 *
 * See_Also: http://enlightenment.org
 *
 * Permission is hereby granted, free of charge, to any person obtaining a copy
 * of this software and associated documentation files (the "Software"), to deal
 * in the Software without restriction, including without limitation the rights
 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
 * copies of the Software, and to permit persons to whom the Software is
 * furnished to do so, subject to the following conditions:

 * The above copyright notice and this permission notice shall be included in
 * all copies or substantial portions of the Software.

 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
 * THE SOFTWARE.
 **/

module defl.c.evas.evas;

// TODO: Fix imported types.
// TODO: Apply D code style.
// TODO: Clean up documentation.

// What is this for? It was generated by bcdgen.
align (4) :

extern (C)
{

/** The type of event to trigger the callback */
enum Evas_Callback_Type {
	EVAS_CALLBACK_MOUSE_IN = 0,             /** Mouse In Event */
	EVAS_CALLBACK_MOUSE_OUT = 1,            /** Mouse Out Event */
	EVAS_CALLBACK_MOUSE_DOWN = 2,           /** Mouse Button Down Event */
	EVAS_CALLBACK_MOUSE_UP = 3,             /** Mouse Button Up Event */
	EVAS_CALLBACK_MOUSE_MOVE = 4,           /** Mouse Move Event */
	EVAS_CALLBACK_MOUSE_WHEEL = 5,          /** Mouse Wheel Event */
	EVAS_CALLBACK_FREE = 6,                 /** Object Being Freed (Called after Del) */
	EVAS_CALLBACK_KEY_DOWN = 7,             /** Key Press Event */
	EVAS_CALLBACK_KEY_UP = 8,               /** Key Release Event */
	EVAS_CALLBACK_FOCUS_IN = 9,             /** Focus In Event */
	EVAS_CALLBACK_FOCUS_OUT = 10,           /** Focus Out Event */
	EVAS_CALLBACK_SHOW = 11,                /** Show Event */
	EVAS_CALLBACK_HIDE = 12,                /** Hide Event */
	EVAS_CALLBACK_MOVE = 13,                /** Move Event */
	EVAS_CALLBACK_RESIZE = 14,              /** Resize Event */
	EVAS_CALLBACK_RESTACK = 15,             /** Restack Event */
	EVAS_CALLBACK_DEL = 16,                 /** Object Being Deleted (called before Free) */
	EVAS_CALLBACK_HOLD = 17,                /** Events go on/off hold */
	EVAS_CALLBACK_CHANGED_SIZE_HINTS = 18   /** Size hints changed event */
}

/** Flags for Mouse Button events */
enum Evas_Button_Flags {
	EVAS_BUTTON_NONE = 0,                   /** No extra mouse button data */
	EVAS_BUTTON_DOUBLE_CLICK = (1 << 0),    /** This mouse button press was the 2nd press of a double click */
	EVAS_BUTTON_TRIPLE_CLICK = (1 << 1)     /** This mouse button press was the 3rd press of a triple click */
}

/** Flags for Events */
enum Evas_Event_Flags {
	EVAS_EVENT_FLAG_NONE = 0,               /** No fancy flags set */
	EVAS_EVENT_FLAG_ON_HOLD = (1 << 0)      /** This event is being delivered but should be put "on hold" until the on hold flag is unset. the event should be used for informational purposes and maybe some indications visually, but not actually perform anything */
}

/** Flags for Font Hinting */
enum Evas_Font_Hinting_Flags {
	EVAS_FONT_HINTING_NONE,         /** No font hinting */
	EVAS_FONT_HINTING_AUTO,         /** Automatic font hinting */
	EVAS_FONT_HINTING_BYTECODE      /** Bytecode font hinting */
}

/** Colorspaces for pixel data supported by Evas */
enum Evas_Colorspace {
	EVAS_COLORSPACE_ARGB8888 = 0,           /** ARGB 32 bits per pixel, high-byte is Alpha, accessed 1 32bit word at a time */
	/* these are not currently supported - but planned for the future */
	EVAS_COLORSPACE_YCBCR422P601_PL = 1,    /** YCbCr 4:2:2 Planar, ITU.BT-601 specifications. The data poitned to is just an array of row pointer, pointing to the Y rows, then the Cb, then Cr rows */
	EVAS_COLORSPACE_YCBCR422P709_PL = 2,    /** YCbCr 4:2:2 Planar, ITU.BT-709 specifications. The data poitned to is just an array of row pointer, pointing to the Y rows, then the Cb, then Cr rows */
	EVAS_COLORSPACE_RGB565_A5P = 3          /** 16bit rgb565 + Alpha plane at end - 5 bits of the 8 being used per alpha byte */
}

/** An array of data */
struct Evas_Array {
	void** data;    /**< Pointer to a vector of pointer to payload */
	uint total;     /**< Total number of slot in the vector */
	uint count;     /**< Number of activ slot in the vector */
	uint step;      /**< How much must we grow the vector When it is full */
}

alias int Evas_Coord;
alias int Evas_Font_Size;
alias int Evas_Angle;
alias ubyte Evas_Bool;

/** A linked list node */
struct Evas_List {
	void* data;             /**< Pointer to list element payload */
	Evas_List* next;        /**< Next member in the list */
	Evas_List* prev;        /**< Previous member in the list */
	void* accounting;       /**< Private list accounting info - don't touch */
}

/** A rectangle */
struct Evas_Rectangle {
	int x;  /**< top-left x co-ordinate of rectangle */
	int y;  /**< top-left y co-ordinate of rectangle */
	int w;  /**< width of rectangle */
	int h;  /**< height of rectangle */
}

/** A rectangle in Evas_Coord */
struct Evas_Coord_Rectangle {
	Evas_Coord x;   /**< top-left x co-ordinate of rectangle */
	Evas_Coord y;   /**< top-left y co-ordinate of rectangle */
	Evas_Coord w;   /**< width of rectangle */
	Evas_Coord h;   /**< height of rectangle */
}

enum Evas_Aspect_Control {
	EVAS_ASPECT_CONTROL_NONE = 0,
	EVAS_ASPECT_CONTROL_NEITHER = 1,
	EVAS_ASPECT_CONTROL_HORIZONTAL = 2,
	EVAS_ASPECT_CONTROL_VERTICAL = 3,
	EVAS_ASPECT_CONTROL_BOTH = 4
}

/** the version you have to put into the version field in the smart class struct */
const int EVAS_SMART_CLASS_VERSION = 1;

/** a smart object class */
struct Evas_Smart_Class {
	char* name; /** the string name of the class */
	int class_version;
	void function(Evas_Object* o) add;
	void function(Evas_Object* o) del;
	void function(Evas_Object* o, Evas_Coord x, Evas_Coord y) move;
	void function(Evas_Object* o, Evas_Coord x, Evas_Coord y) resize;
	void function(Evas_Object* o) show;
	void function(Evas_Object* o) hide;
	void function(Evas_Object* o, int r, int g, int b, int a) color_set;
	void function(Evas_Object* o, Evas_Object* clip) clip_set;
	void function(Evas_Object* o) clip_unset;
	void* data;
}

/**< A source description of pixels for importing pixels */
struct Evas_Pixel_Import_Source {
	int format;     /**< pixel format type ie ARGB32, YUV420P_601 etc. */
	int w;          /**< width of source in pixels */
	int h;          /**< height of source in pixels */
	void** rows;    /**< an array of pointers (size depends on format) pointing to left edge of each scanline */
}

/**< A generic Evas Engine information structure */
struct Evas_Engine_Info {
	int magic;
}

// TODO: Move these to just before they are used.
alias void Evas;                /**< An Evas canvas handle */
alias void Evas_Object;         /**< An Evas Object handle */
alias void Evas_Performance;    /**< An Evas Performance handle */
alias void Evas_Modifier;       /**< An Evas Modifier */
alias void Evas_Lock;           /**< An Evas Lock */
alias void Evas_Smart;          /**< An Evas Smart Object handle */
alias ulong Evas_Modifier_Mask; /**< An Evas modifier mask type */
alias void Evas_Imaging_Font;
alias void Evas_Imaging_Image;
alias void Evas_Textblock_Cursor;
alias void Evas_Textblock_Style;

/** Mouse button press event */
struct Evas_Event_Mouse_Down {
	struct OutputCoordinate { int x; int y; }
	struct CanvasCoordinate { Evas_Coord x; Evas_Coord y; }
	
	int button; /**< Mouse button number that went down (1 - 32) */
	OutputCoordinate output;
	CanvasCoordinate canvas;
	void* data;
	Evas_Modifier* modifiers;
	Evas_Lock* locks;
	Evas_Button_Flags flags;
	uint timestamp;
	Evas_Event_Flags event_flags;
}

/** Mouse button release event */
struct Evas_Event_Mouse_Up {
	struct OutputCoordinate { int x; int y; }
	struct CanvasCoordinate { Evas_Coord x; Evas_Coord y; }
	
	int button; /**< Mouse button number that was released (1 - 32) */
	OutputCoordinate output;
	CanvasCoordinate canvas;
	void* data;
	Evas_Modifier* modifiers;
	Evas_Lock* locks;
	Evas_Button_Flags flags;
	uint timestamp;
	Evas_Event_Flags event_flags;
}

/** Mouse enter event */
struct Evas_Event_Mouse_In {
	struct OutputCoordinate { int x; int y; }
	struct CanvasCoordinate { Evas_Coord x; Evas_Coord y; }
	
	int buttons; /**< Button pressed mask, Bits set to 1 are buttons currently pressed (bit 0 = mouse button 1, bit 1 = mouse button 2 etc.) */
	OutputCoordinate output;
	CanvasCoordinate canvas;
	void* data;
	Evas_Modifier* modifiers;
	Evas_Lock* locks;
	Evas_Button_Flags flags;
	uint timestamp;
	Evas_Event_Flags event_flags;
}

/** Mouse leave event */
struct Evas_Event_Mouse_Out {	
	struct OutputCoordinate { int x; int y; }
	struct CanvasCoordinate { Evas_Coord x; Evas_Coord y; }
	
	int buttons; /**< Button pressed mask, Bits set to 1 are buttons currently pressed (bit 0 = mouse button 1, bit 1 = mouse button 2 etc.) */
	OutputCoordinate output;
	CanvasCoordinate canvas;
	void* data;
	Evas_Modifier* modifiers;
	Evas_Lock* locks;
	Evas_Button_Flags flags;
	uint timestamp;
	Evas_Event_Flags event_flags;
}

/** Mouse move event */
struct Evas_Event_Mouse_Move {
	struct MouseLocation {
		struct OutputCoordinate { int x; int y; }
		struct CanvasCoordinate { Evas_Coord x; Evas_Coord y; }
	}

	int buttons; /**< Button pressed mask, Bits set to 1 are buttons currently pressed (bit 0 = mouse button 1, bit 1 = mouse button 2 etc.) */
	MouseLocation cur, prev;
	void* data;
	Evas_Modifier* modifiers;
	Evas_Lock* locks;
	uint timestamp;
	Evas_Event_Flags event_flags;
}

/** Wheel event */
struct Evas_Event_Mouse_Wheel {
	struct OutputCoordinate { int x; int y; }
	struct CanvasCoordinate { Evas_Coord x; Evas_Coord y; }
	
	int direction;  /** 0 = default up/down wheel FIXME: more wheel types */
	int z;          /** ...,-2,-1 = down, 1,2,... = up */
	OutputCoordinate output;
	CanvasCoordinate canvas;
	void* data;
	Evas_Modifier* modifiers;
	Evas_Lock* locks;
	uint timestamp;
	Evas_Event_Flags event_flags;
}

/** Key press event */
struct Evas_Event_Key_Down {
	char* keyname; /**< The string name of the key pressed */
	void* data;
	Evas_Modifier* modifiers;
	Evas_Lock* locks;
	char* key;      /**< The logical key : (eg shift+1 == exclamation) */
	char* string;   /**< A UTF8 string if this keystroke has produced a visible string to be ADDED */
	char* compose;  /**< A UTF8 string if this keystroke has modified a string in the middle of being composed - this string replaces the previous one */
	uint timestamp;
	Evas_Event_Flags event_flags;
}

/** Key release event */
struct Evas_Event_Key_Up {
	char* keyname; /**< The string name of the key pressed */
	void* data;
	Evas_Modifier* modifiers;
	Evas_Lock* locks;
	char* key;      /**< The logical key : (eg shift+1 == exclamation) */
	char* string;   /**< A UTF8 string if this keystroke has produced a visible string to be ADDED */
	char* compose;  /**< A UTF8 string if this keystroke has modified a string in the middle of being composed - this string replaces the previous one */
	uint timestamp;
	Evas_Event_Flags event_flags;
}

/** Hold change event */
struct Evas_Event_Hold {
	int hold; /**< The hold flag */
	void* data;
	uint timestamp;
	Evas_Event_Flags event_flags;
}

const int EVAS_LOAD_ERROR_NONE = 0;                             /**< No error on load */
const int EVAS_LOAD_ERROR_GENERIC = 1;                          /**< A non-specific error occured */
const int EVAS_LOAD_ERROR_DOES_NOT_EXIST = 2;                   /**< File (or file path) does not exist */
const int EVAS_LOAD_ERROR_PERMISSION_DENIED = 3;                /**< Permission deinied to an existing file (or path) */
const int EVAS_LOAD_ERROR_RESOURCE_ALLOCATION_FAILED = 4;       /**< Allocation of resources failure prevented load */
const int EVAS_LOAD_ERROR_CORRUPT_FILE = 5;                     /**< File corrupt (but was detected as a known format) */
const int EVAS_LOAD_ERROR_UNKNOWN_FORMAT = 6;                   /**< File is not a known format */

const int EVAS_ALLOC_ERROR_NONE = 0;                            /**< No allocation error */
const int EVAS_ALLOC_ERROR_FATAL = 1;                           /**< Allocation failed despite attempts to free up memory */
const int EVAS_ALLOC_ERROR_RECOVERED = 2;                       /**< Allocation succeeded, but extra memory had to be found by freeing up speculative resources */

const int EVAS_TEXT_INVALID = -1;
const int EVAS_TEXT_SPECIAL = -2;

struct Evas_Native_Surface {
	union NativeSurface {
		void* p;
		ushort s;
		uint i;
		uint l;
	} 
	
	NativeSurface data;
}

const int EVAS_LAYER_MIN = -32768;               /**< bottom-most layer number */
const int EVAS_LAYER_MAX = 32767;                /**< top-most layer number */

const int EVAS_PIXEL_FORMAT_NONE = 0;           /**< No pixel format */
const int EVAS_PIXEL_FORMAT_ARGB32 = 1;         /**< ARGB 32bit pixel format with A in the high byte per 32bit pixel word */
const int EVAS_PIXEL_FORMAT_YUV420P_601 = 2;    /**< YUV 420 Planar format with CCIR 601 color encoding wuth contiguous planes in the order Y, U and V */

const int EVAS_COLOR_SPACE_ARGB = 0;            /**< ARGB color space */
const int EVAS_COLOR_SPACE_AHSV = 1;            /**< AHSV color space */

const int EVAS_TEXTURE_REFLECT = 0;             /**< Gradient and image fill tiling mode - tiling reflects */
const int EVAS_TEXTURE_REPEAT = 1;              /**< tiling repeats */
const int EVAS_TEXTURE_RESTRICT =  2;           /**< tiling clamps - range offset ignored */
const int EVAS_TEXTURE_RESTRICT_REFLECT = 3;    /**< tiling clamps and any range offset reflects */
const int EVAS_TEXTURE_RESTRICT_REPEAT = 4;     /**< tiling clamps and any range offset repeats */
const int EVAS_TEXTURE_PAD = 5;                 /**< tiling extends with end values */

enum Evas_Render_Op {
	EVAS_RENDER_BLEND = 0,          /**< default op: d = d*(1-sa) + s */
	EVAS_RENDER_BLEND_REL = 1,      /**< d = d*(1 - sa) + s*da */
	EVAS_RENDER_COPY = 2,           /**< d = s */
	EVAS_RENDER_COPY_REL = 3,       /**< d = s*da */
	EVAS_RENDER_ADD = 4,            /**< d = d + s */
	EVAS_RENDER_ADD_REL = 5,        /**< d = d + s*da */
	EVAS_RENDER_SUB = 6,            /**< d = d - s */
	EVAS_RENDER_SUB_REL = 7,        /**< d = d - s*da */
	EVAS_RENDER_TINT = 8,           /**< d = d*s + d*(1 - sa) + s*(1 - da) */
	EVAS_RENDER_TINT_REL = 9,       /**< d = d*(1 - sa + s) */
	EVAS_RENDER_MASK = 10,          /**< d = d*sa */
	EVAS_RENDER_MUL = 11            /**< d = d*s */
}

enum Evas_Object_Pointer_Mode {
	EVAS_OBJECT_POINTER_MODE_AUTOGRAB = 0, /**< default, X11-like */
	EVAS_OBJECT_POINTER_MODE_NOGRAB = 1
}

// EVAS List
Evas_List* evas_list_append(Evas_List* list, void* data);
Evas_List* evas_list_prepend(Evas_List* list, void* data);
Evas_List* evas_list_append_relative(Evas_List* list, void* data, void* relative);
Evas_List* evas_list_append_relative_list(Evas_List* list, void* data, Evas_List* relative);
Evas_List* evas_list_prepend_relative(Evas_List* list, void* data, void* relative);
Evas_List* evas_list_prepend_relative_list(Evas_List* list, void* data, Evas_List* relative);
Evas_List* evas_list_remove(Evas_List* list, void* data);
Evas_List* evas_list_remove_list(Evas_List* list, Evas_List* remove_list);
Evas_List* evas_list_promote_list(Evas_List* list, Evas_List* move_list);
void*      evas_list_find(Evas_List* list, void* data);
Evas_List* evas_list_find_list(Evas_List* list, void* data);
Evas_List* evas_list_free(Evas_List* list);
Evas_List* evas_list_last(Evas_List* list);
Evas_List* evas_list_next(Evas_List* list);
Evas_List* evas_list_prev(Evas_List* list);
void*      evas_list_data(Evas_List* list);
int        evas_list_count(Evas_List* list);
void*      evas_list_nth(Evas_List* list, int n);
Evas_List* evas_list_nth_list(Evas_List* list, int n);
Evas_List* evas_list_reverse(Evas_List* list);
Evas_List* evas_list_sort(Evas_List* list, int size, int function(void*, void*));
int        evas_list_alloc_error();

// EVAS Array
Evas_Array* evas_array_new(uint step);
void        evas_array_setup(Evas_Array* array, uint step);
void        evas_array_free(Evas_Array* array);
void        evas_array_append(Evas_Array* array, void* data);
void*       evas_array_get(Evas_Array* array, uint index);
void        evas_array_clean(Evas_Array* array);
void        evas_array_flush(Evas_Array* array);

// EVAS Hash
alias void Evas_Hash; /**< A Hash table handle */

Evas_Hash* evas_hash_add(Evas_Hash* hash, char* key, void* data);
Evas_Hash* evas_hash_direct_add(Evas_Hash* hash, char* key, void* data);
Evas_Hash* evas_hash_del(Evas_Hash* hash, char* key, void* data);
void*      evas_hash_find(Evas_Hash* hash, char* key);
void*      evas_hash_modify(Evas_Hash* hash, char* key, void* data);
int        evas_hash_size(Evas_Hash* hash);
void       evas_hash_free(Evas_Hash* hash);
void       evas_hash_foreach(Evas_Hash* hash, Evas_Bool function(Evas_Hash* hash, char* key, void* data, void* fdata), void* fdata);
int        evas_hash_alloc_error();

char* evas_stringshare_add(char* str);
void  evas_stringshare_del(char* str);

int evas_alloc_error();

int evas_init();
int evas_shutdown();

Evas* evas_new();
void  evas_free(Evas* e);

int        evas_render_method_lookup(char* name);
Evas_List* evas_render_method_list();
void       evas_render_method_list_free(Evas_List* list);

void evas_output_method_set(Evas* e, int render_method);
int  evas_output_method_get(Evas* e);

Evas_Engine_Info* evas_engine_info_get(Evas* e);
void              evas_engine_info_set(Evas* e, Evas_Engine_Info* info);

void evas_output_size_set(Evas* e, int w, int h);
void evas_output_size_get(Evas* e, int* w, int* h);
void evas_output_viewport_set(Evas* e, Evas_Coord x, Evas_Coord y, Evas_Coord w, Evas_Coord h);
void evas_output_viewport_get(Evas* e, Evas_Coord* x, Evas_Coord* y, Evas_Coord* w, Evas_Coord* h);

Evas_Coord        evas_coord_screen_x_to_world(Evas* e, int x);
Evas_Coord        evas_coord_screen_y_to_world(Evas* e, int y);
int               evas_coord_world_x_to_screen(Evas* e, Evas_Coord x);
int               evas_coord_world_y_to_screen(Evas* e, Evas_Coord y);

void              evas_pointer_output_xy_get(Evas* e, int* x, int* y);
void              evas_pointer_canvas_xy_get(Evas* e, Evas_Coord* x, Evas_Coord* y);
int               evas_pointer_button_down_mask_get(Evas* e);
Evas_Bool         evas_pointer_inside_get(Evas* e);
void              evas_data_attach_set(Evas* e, void* data);
void*             evas_data_attach_get(Evas* e);

void              evas_damage_rectangle_add(Evas* e, int x, int y, int w, int h);
void              evas_obscured_rectangle_add(Evas* e, int x, int y, int w, int h);
void              evas_obscured_clear(Evas* e);
Evas_List*        evas_render_updates(Evas* e);
void              evas_render_updates_free(Evas_List* updates);
void              evas_render(Evas* e);
void              evas_norender(Evas* e);
void              evas_render_idle_flush(Evas* e);

/* rectangle objects */
Evas_Object*    evas_object_rectangle_add(Evas* e);

/* line objects */
Evas_Object*      evas_object_line_add(Evas* e);
void              evas_object_line_xy_set(Evas_Object* obj, Evas_Coord x1, Evas_Coord y1, Evas_Coord x2, Evas_Coord y2);
void              evas_object_line_xy_get( Evas_Object* obj, Evas_Coord* x1, Evas_Coord* y1, Evas_Coord* x2, Evas_Coord* y2);

/* gradient objects */
Evas_Object*      evas_object_gradient_add(Evas* e);
void              evas_object_gradient_color_stop_add(Evas_Object* obj, int r, int g, int b, int a, int delta);
void              evas_object_gradient_alpha_stop_add(Evas_Object* obj, int a, int delta);
void              evas_object_gradient_color_data_set(Evas_Object* obj, void* color_data, int len, Evas_Bool has_alpha);
void              evas_object_gradient_alpha_data_set(Evas_Object* obj, void* alpha_data, int len);
void              evas_object_gradient_clear(Evas_Object* obj);
void              evas_object_gradient_type_set(Evas_Object* obj, char* type, char* instance_params);
void              evas_object_gradient_type_get(Evas_Object* obj, char** type, char** instance_params);
void              evas_object_gradient_fill_set(Evas_Object* obj, Evas_Coord x, Evas_Coord y, Evas_Coord w, Evas_Coord h);
void              evas_object_gradient_fill_get(Evas_Object* obj, Evas_Coord* x, Evas_Coord* y, Evas_Coord* w, Evas_Coord* h);
void              evas_object_gradient_fill_angle_set(Evas_Object* obj, Evas_Angle angle);
Evas_Angle        evas_object_gradient_fill_angle_get(Evas_Object* obj);
void              evas_object_gradient_fill_spread_set(Evas_Object* obj, int tile_mode);
int               evas_object_gradient_fill_spread_get(Evas_Object* obj);
void              evas_object_gradient_angle_set(Evas_Object* obj, Evas_Angle angle);
Evas_Angle        evas_object_gradient_angle_get(Evas_Object* obj);
void              evas_object_gradient_direction_set(Evas_Object* obj, int direction);
int               evas_object_gradient_direction_get(Evas_Object* obj);
void              evas_object_gradient_offset_set(Evas_Object* obj, float offset);
float             evas_object_gradient_offset_get(Evas_Object* obj);

/* polygon objects */
Evas_Object*      evas_object_polygon_add(Evas* e);
void              evas_object_polygon_point_add(Evas_Object* obj, Evas_Coord x, Evas_Coord y);
void              evas_object_polygon_points_clear(Evas_Object* obj);

/* image objects */
Evas_Object*      evas_object_image_add(Evas* e);
void              evas_object_image_file_set(Evas_Object* obj, char* file, char* key);
void              evas_object_image_file_get(Evas_Object* obj, char* *file, char* *key);
void              evas_object_image_border_set(Evas_Object* obj, int l, int r, int t, int b);
void              evas_object_image_border_get(Evas_Object* obj, int* l, int* r, int* t, int* b);
void              evas_object_image_border_center_fill_set(Evas_Object* obj, Evas_Bool fill);
Evas_Bool         evas_object_image_border_center_fill_get( Evas_Object* obj);
void              evas_object_image_fill_set(Evas_Object* obj, Evas_Coord x, Evas_Coord y, Evas_Coord w, Evas_Coord h);
void              evas_object_image_fill_get(Evas_Object* obj, Evas_Coord* x, Evas_Coord* y, Evas_Coord* w, Evas_Coord* h);
void              evas_object_image_size_set(Evas_Object* obj, int w, int h);
void              evas_object_image_size_get(Evas_Object* obj, int* w, int* h);
int               evas_object_image_stride_get(Evas_Object* obj);
int               evas_object_image_load_error_get(Evas_Object* obj);
void              evas_object_image_data_set(Evas_Object* obj, void* data);
void*             evas_object_image_data_convert(Evas_Object* obj, Evas_Colorspace to_cspace);
void*             evas_object_image_data_get(Evas_Object* obj, Evas_Bool for_writing);
void              evas_object_image_data_copy_set(Evas_Object* obj, void* data);
void              evas_object_image_data_update_add(Evas_Object* obj, int x, int y, int w, int h);
void              evas_object_image_alpha_set(Evas_Object* obj, Evas_Bool has_alpha);
Evas_Bool         evas_object_image_alpha_get(Evas_Object* obj);
void              evas_object_image_smooth_scale_set(Evas_Object* obj, Evas_Bool smooth_scale);
Evas_Bool         evas_object_image_smooth_scale_get(Evas_Object* obj);
void              evas_object_image_reload(Evas_Object* obj);
Evas_Bool         evas_object_image_save(Evas_Object* obj, char* file, char* key, char* flags);
Evas_Bool         evas_object_image_pixels_import(Evas_Object* obj, Evas_Pixel_Import_Source* pixels);
void              evas_object_image_pixels_get_callback_set(Evas_Object* obj, void function(void* data, Evas_Object* o), void* data);
void              evas_object_image_pixels_dirty_set(Evas_Object* obj, Evas_Bool dirty);
Evas_Bool         evas_object_image_pixels_dirty_get(Evas_Object* obj);
void              evas_object_image_load_dpi_set(Evas_Object* obj, double dpi);
double            evas_object_image_load_dpi_get(Evas_Object* obj);
void              evas_object_image_load_size_set(Evas_Object* obj, int w, int h);
void              evas_object_image_load_size_get(Evas_Object* obj, int* w, int* h);
void              evas_object_image_load_scale_down_set(Evas_Object* obj, int scale_down);
int               evas_object_image_load_scale_down_get(Evas_Object* obj);
void              evas_object_image_colorspace_set(Evas_Object* obj, Evas_Colorspace cspace);
Evas_Colorspace   evas_object_image_colorspace_get(Evas_Object* obj);
void                 evas_object_image_native_surface_set(Evas_Object* obj, Evas_Native_Surface* surf);
Evas_Native_Surface* evas_object_image_native_surface_get(Evas_Object* obj);

/* image cache */
void              evas_image_cache_flush(Evas* e);
void              evas_image_cache_reload(Evas* e);
void              evas_image_cache_set(Evas* e, int size);
int               evas_image_cache_get(Evas* e);

/* text objects */
enum Evas_Text_Style_Type {
	EVAS_TEXT_STYLE_PLAIN = 0,
	EVAS_TEXT_STYLE_SHADOW = 1,
	EVAS_TEXT_STYLE_OUTLINE = 2,
	EVAS_TEXT_STYLE_SOFT_OUTLINE = 3,
	EVAS_TEXT_STYLE_GLOW = 4,
	EVAS_TEXT_STYLE_OUTLINE_SHADOW = 5,
	EVAS_TEXT_STYLE_FAR_SHADOW = 6,
	EVAS_TEXT_STYLE_OUTLINE_SOFT_SHADOW = 7,
	EVAS_TEXT_STYLE_SOFT_SHADOW = 8,
	EVAS_TEXT_STYLE_FAR_SOFT_SHADOW = 9
}

Evas_Object*         evas_object_text_add(Evas* e);
void                 evas_object_text_font_source_set(Evas_Object* obj, char* font);
char*                evas_object_text_font_source_get(Evas_Object* obj);
void                 evas_object_text_font_set(Evas_Object* obj, char* font, Evas_Font_Size size);
void                 evas_object_text_font_get(Evas_Object* obj, char* *font, Evas_Font_Size* size);
void                 evas_object_text_text_set(Evas_Object* obj, char* text);
char*                evas_object_text_text_get(Evas_Object* obj);
Evas_Coord           evas_object_text_ascent_get(Evas_Object* obj);
Evas_Coord           evas_object_text_descent_get(Evas_Object* obj);
Evas_Coord           evas_object_text_max_ascent_get(Evas_Object* obj);
Evas_Coord           evas_object_text_max_descent_get(Evas_Object* obj);
Evas_Coord           evas_object_text_horiz_advance_get(Evas_Object* obj);
Evas_Coord           evas_object_text_vert_advance_get(Evas_Object* obj);
Evas_Coord           evas_object_text_inset_get(Evas_Object* obj);
int                  evas_object_text_char_pos_get(Evas_Object* obj, int pos, Evas_Coord* cx, Evas_Coord* cy, Evas_Coord* cw, Evas_Coord* ch);
int                  evas_object_text_char_coords_get(Evas_Object* obj, Evas_Coord x, Evas_Coord y, Evas_Coord* cx, Evas_Coord* cy, Evas_Coord* cw, Evas_Coord* ch);
Evas_Text_Style_Type evas_object_text_style_get(Evas_Object* obj);
void                 evas_object_text_style_set(Evas_Object* obj, Evas_Text_Style_Type type);
void                 evas_object_text_shadow_color_set(Evas_Object* obj, int r, int g, int b, int a);
void                 evas_object_text_shadow_color_get(Evas_Object* obj, int* r, int* g, int* b, int* a);
void                 evas_object_text_glow_color_set(Evas_Object* obj, int r, int g, int b, int a);
void                 evas_object_text_glow_color_get(Evas_Object* obj, int* r, int* g, int* b, int* a);
void                 evas_object_text_glow2_color_set(Evas_Object* obj, int r, int g, int b, int a);
void                 evas_object_text_glow2_color_get(Evas_Object* obj, int* r, int* g, int* b, int* a);
void                 evas_object_text_outline_color_set(Evas_Object* obj, int r, int g, int b, int a);
void                 evas_object_text_outline_color_get(Evas_Object* obj, int* r, int* g, int* b, int* a);
void                 evas_object_text_style_pad_get(Evas_Object* obj, int* l, int* r, int* t, int* b);

/* string and font handling */
int               evas_string_char_next_get(char* str, int pos, int* decoded);
int               evas_string_char_prev_get(char* str, int pos, int* decoded);

void              evas_font_path_clear(Evas* e);
void              evas_font_path_append(Evas* e, char* path);
void              evas_font_path_prepend(Evas* e, char* path);
Evas_List*        evas_font_path_list(Evas* e);

void              evas_font_hinting_set(Evas* e, Evas_Font_Hinting_Flags hinting);
Evas_Font_Hinting_Flags evas_font_hinting_get(Evas* e);
Evas_Bool         evas_font_hinting_can_hint(Evas* e, Evas_Font_Hinting_Flags hinting);

void              evas_font_cache_flush(Evas* e);
void              evas_font_cache_set(Evas* e, int size);
int               evas_font_cache_get(Evas* e);

Evas_List*            evas_font_available_list(Evas* e);
void                  evas_font_available_list_free(Evas* e, Evas_List* available);

/* textblock objects */
struct Evas_Textblock_Rectangle {
	int x;
	int y;
	int w;
	int h;
}

enum Evas_Textblock_Text_Type {
	EVAS_TEXTBLOCK_TEXT_RAW = 0,
	EVAS_TEXTBLOCK_TEXT_PLAIN = 1
}

Evas_Object*                 evas_object_textblock_add(Evas* e);

Evas_Textblock_Style*        evas_textblock_style_new();
void                         evas_textblock_style_free(Evas_Textblock_Style* ts);
void                         evas_textblock_style_set(Evas_Textblock_Style* ts, char* text);
char*                        evas_textblock_style_get(Evas_Textblock_Style* ts);

void                         evas_object_textblock_style_set(Evas_Object* obj, Evas_Textblock_Style* ts);
Evas_Textblock_Style*        evas_object_textblock_style_get(Evas_Object* obj);

void                         evas_object_textblock_text_markup_set(Evas_Object* obj, char* text);
char*                        evas_object_textblock_text_markup_get(Evas_Object* obj);

Evas_Textblock_Cursor*       evas_object_textblock_cursor_get(Evas_Object* obj);
Evas_Textblock_Cursor*       evas_object_textblock_cursor_new(Evas_Object* obj);

void                         evas_textblock_cursor_free(Evas_Textblock_Cursor* cur);

void                         evas_textblock_cursor_node_first(Evas_Textblock_Cursor* cur);
void                         evas_textblock_cursor_node_last(Evas_Textblock_Cursor* cur);
Evas_Bool                    evas_textblock_cursor_node_next(Evas_Textblock_Cursor* cur);
Evas_Bool                    evas_textblock_cursor_node_prev(Evas_Textblock_Cursor* cur);
Evas_Bool                    evas_textblock_cursor_char_next(Evas_Textblock_Cursor* cur);
Evas_Bool                    evas_textblock_cursor_char_prev(Evas_Textblock_Cursor* cur);
void                         evas_textblock_cursor_char_first(Evas_Textblock_Cursor* cur);
void                         evas_textblock_cursor_char_last(Evas_Textblock_Cursor* cur);
void                         evas_textblock_cursor_line_first(Evas_Textblock_Cursor* cur);
void                         evas_textblock_cursor_line_last(Evas_Textblock_Cursor* cur);
int                          evas_textblock_cursor_pos_get(Evas_Textblock_Cursor* cur);
void                         evas_textblock_cursor_pos_set(Evas_Textblock_Cursor* cur, int pos);
Evas_Bool                    evas_textblock_cursor_line_set(Evas_Textblock_Cursor* cur, int line);
int                          evas_textblock_cursor_compare(Evas_Textblock_Cursor* cur1,  Evas_Textblock_Cursor* cur2);
void                         evas_textblock_cursor_copy(Evas_Textblock_Cursor* cur, Evas_Textblock_Cursor* cur_dest);

void                         evas_textblock_cursor_text_append(Evas_Textblock_Cursor* cur, char* text);
void                         evas_textblock_cursor_text_prepend(Evas_Textblock_Cursor* cur, char* text);

void                         evas_textblock_cursor_format_append(Evas_Textblock_Cursor* cur, char* format);
void                         evas_textblock_cursor_format_prepend(Evas_Textblock_Cursor* cur, char* format);
void                         evas_textblock_cursor_node_delete(Evas_Textblock_Cursor* cur);
void                         evas_textblock_cursor_char_delete(Evas_Textblock_Cursor* cur);
void                         evas_textblock_cursor_range_delete(Evas_Textblock_Cursor* cur1, Evas_Textblock_Cursor* cur2);

char*                        evas_textblock_cursor_node_text_get(Evas_Textblock_Cursor* cur);
int                          evas_textblock_cursor_node_text_length_get(Evas_Textblock_Cursor* cur);
char*                        evas_textblock_cursor_node_format_get(Evas_Textblock_Cursor* cur);
char*                        evas_textblock_cursor_range_text_get(Evas_Textblock_Cursor* cur1,  Evas_Textblock_Cursor* cur2, Evas_Textblock_Text_Type format);

int                          evas_textblock_cursor_char_geometry_get(Evas_Textblock_Cursor* cur, Evas_Coord* cx, Evas_Coord* cy, Evas_Coord* cw, Evas_Coord* ch);
int                          evas_textblock_cursor_line_geometry_get(Evas_Textblock_Cursor* cur, Evas_Coord* cx, Evas_Coord* cy, Evas_Coord* cw, Evas_Coord* ch);
Evas_Bool                    evas_textblock_cursor_char_coord_set(Evas_Textblock_Cursor* cur, Evas_Coord x, Evas_Coord y);
int                          evas_textblock_cursor_line_coord_set(Evas_Textblock_Cursor* cur, Evas_Coord y);
Evas_List*                   evas_textblock_cursor_range_geometry_get(Evas_Textblock_Cursor* cur1,  Evas_Textblock_Cursor* cur2);

Evas_Bool                    evas_object_textblock_line_number_geometry_get(Evas_Object* obj, int line, Evas_Coord* cx, Evas_Coord* cy, Evas_Coord* cw, Evas_Coord* ch);
void                         evas_object_textblock_clear(Evas_Object* obj);
void                         evas_object_textblock_size_formatted_get(Evas_Object* obj, Evas_Coord* w, Evas_Coord* h);
void                         evas_object_textblock_size_native_get(Evas_Object* obj, Evas_Coord* w, Evas_Coord* h);
void                         evas_object_textblock_style_insets_get(Evas_Object* obj, Evas_Coord* l, Evas_Coord* r, Evas_Coord* t, Evas_Coord* b);

/* general objects */
void              evas_object_del(Evas_Object* obj);

char*             evas_object_type_get(Evas_Object* obj);

void              evas_object_layer_set(Evas_Object* obj, short l);
short             evas_object_layer_get(Evas_Object* obj);

void              evas_object_raise(Evas_Object* obj);
void              evas_object_lower(Evas_Object* obj);
void              evas_object_stack_above(Evas_Object* obj, Evas_Object* above);
void              evas_object_stack_below(Evas_Object* obj, Evas_Object* below);
Evas_Object*      evas_object_above_get(Evas_Object* obj);
Evas_Object*      evas_object_below_get(Evas_Object* obj);
Evas_Object*      evas_object_bottom_get(Evas* e);
Evas_Object*      evas_object_top_get(Evas* e);

void              evas_object_move(Evas_Object* obj, Evas_Coord x, Evas_Coord y);
void              evas_object_resize(Evas_Object* obj, Evas_Coord w, Evas_Coord h);
void              evas_object_geometry_get(Evas_Object* obj, Evas_Coord* x, Evas_Coord* y, Evas_Coord* w, Evas_Coord* h);

void              evas_object_size_hint_min_get(Evas_Object* obj, Evas_Coord* w, Evas_Coord* h);
void              evas_object_size_hint_min_set(Evas_Object* obj, Evas_Coord w, Evas_Coord h);
void              evas_object_size_hint_max_get(Evas_Object* obj, Evas_Coord* w, Evas_Coord* h);
void              evas_object_size_hint_max_set(Evas_Object* obj, Evas_Coord w, Evas_Coord h);
void              evas_object_size_hint_request_get(Evas_Object* obj, Evas_Coord* w, Evas_Coord* h);
void              evas_object_size_hint_request_set(Evas_Object* obj, Evas_Coord w, Evas_Coord h);
void              evas_object_size_hint_aspect_get(Evas_Object* obj, Evas_Aspect_Control* aspect, Evas_Coord* w, Evas_Coord* h);
void              evas_object_size_hint_aspect_set(Evas_Object* obj, Evas_Aspect_Control aspect, Evas_Coord w, Evas_Coord h);

void              evas_object_show(Evas_Object* obj);
void              evas_object_hide(Evas_Object* obj);
Evas_Bool         evas_object_visible_get(Evas_Object* obj);

void              evas_object_render_op_set(Evas_Object* obj, Evas_Render_Op op);
Evas_Render_Op    evas_object_render_op_get(Evas_Object* obj);

void              evas_object_anti_alias_set(Evas_Object* obj, Evas_Bool antialias);
Evas_Bool         evas_object_anti_alias_get(Evas_Object* obj);

void              evas_object_color_set(Evas_Object* obj, int r, int g, int b, int a);
void              evas_object_color_get(Evas_Object* obj, int* r, int* g, int* b, int* a);

void              evas_object_color_interpolation_set(Evas_Object* obj, int color_space);
int               evas_object_color_interpolation_get(Evas_Object* obj);

void              evas_object_clip_set(Evas_Object* obj, Evas_Object* clip);
Evas_Object*      evas_object_clip_get(Evas_Object* obj);
void              evas_object_clip_unset(Evas_Object* obj);
Evas_List*        evas_object_clipees_get(Evas_Object* obj);

void              evas_object_data_set(Evas_Object* obj, char* key,  void* data);
void*             evas_object_data_get(Evas_Object* obj, char* key);
void*             evas_object_data_del(Evas_Object* obj, char* key);

void              evas_object_name_set(Evas_Object* obj, char* name);
char*             evas_object_name_get(Evas_Object* obj);
Evas_Object*      evas_object_name_find(Evas* e, char* name);

Evas*             evas_object_evas_get(Evas_Object* obj);

Evas_Object*      evas_object_top_at_xy_get(Evas* e, Evas_Coord x, Evas_Coord y, Evas_Bool include_pass_events_objects, Evas_Bool include_hidden_objects);
Evas_Object*      evas_object_top_at_pointer_get(Evas* e);
Evas_Object*      evas_object_top_in_rectangle_get(Evas* e, Evas_Coord x, Evas_Coord y, Evas_Coord w, Evas_Coord h, Evas_Bool include_pass_events_objects, Evas_Bool include_hidden_objects);

Evas_List*        evas_objects_at_xy_get(Evas* e, Evas_Coord x, Evas_Coord y, Evas_Bool include_pass_events_objects, Evas_Bool include_hidden_objects);
Evas_List*        evas_objects_in_rectangle_get(Evas* e, Evas_Coord x, Evas_Coord y, Evas_Coord w, Evas_Coord h, Evas_Bool include_pass_events_objects, Evas_Bool include_hidden_objects);

/* smart objects */
Evas_Smart*       evas_smart_new(char* name,
				 void function(Evas_Object* obj) add,
				 void function(Evas_Object* obj) del,
				 void function(Evas_Object* obj, int l) layer_set,
				 void function(Evas_Object* obj) raise,
				 void function(Evas_Object* obj) lower,
				 void function(Evas_Object* obj, Evas_Object* above) stack_above,
				 void function(Evas_Object* obj, Evas_Object* below) stack_below,
				 void function(Evas_Object* obj, Evas_Coord x, Evas_Coord y) move,
				 void function(Evas_Object* obj, Evas_Coord w, Evas_Coord h) resize,
				 void function(Evas_Object* obj) show,
				 void function(Evas_Object* obj) hide,
				 void function(Evas_Object* obj, int r, int g, int b, int a) color_set,
				 void function(Evas_Object* obj, Evas_Object* clip) clip_set,
				 void function(Evas_Object* obj) clip_unset,
				 void* data);
void              evas_smart_free(Evas_Smart* s);
Evas_Smart*       evas_smart_class_new(Evas_Smart_Class* sc);
Evas_Smart_Class* evas_smart_class_get(Evas_Smart* s);

void*             evas_smart_data_get(Evas_Smart* s);

Evas_Object*      evas_object_smart_add(Evas* e, Evas_Smart* s);
void              evas_object_smart_member_add(Evas_Object* obj, Evas_Object* smart_obj);
void              evas_object_smart_member_del(Evas_Object* obj);
Evas_Object*      evas_object_smart_parent_get(Evas_Object* obj);
Evas_List*        evas_object_smart_members_get(Evas_Object* obj);
Evas_Smart*       evas_object_smart_smart_get(Evas_Object* obj);
void*             evas_object_smart_data_get(Evas_Object* obj);
void              evas_object_smart_data_set(Evas_Object* obj, void* data);
void              evas_object_smart_callback_add(Evas_Object* obj,
						 char* event,
						 void function(void* data, Evas_Object* obj, void* event_info) callback,
						 void* data);
void*             evas_object_smart_callback_del(Evas_Object* obj,
						 char* event,
						 void function(void* data, Evas_Object* obj, void* event_info) callback);
void              evas_object_smart_callback_call(Evas_Object* obj, char* event, void* event_info);

/* events */
void              evas_event_freeze(Evas* e);
void              evas_event_thaw(Evas* e);
int               evas_event_freeze_get(Evas* e);
void              evas_event_feed_mouse_down(Evas* e, int b, Evas_Button_Flags flags, uint timestamp, void* data);
void              evas_event_feed_mouse_up(Evas* e, int b, Evas_Button_Flags flags, uint timestamp, void* data);
void              evas_event_feed_mouse_move(Evas* e, int x, int y, uint timestamp, void* data);
void              evas_event_feed_mouse_in(Evas* e, uint timestamp, void* data);
void              evas_event_feed_mouse_out(Evas* e, uint timestamp, void* data);
void              evas_event_feed_mouse_cancel(Evas* e, uint timestamp, void* data);
void              evas_event_feed_mouse_wheel(Evas* e, int direction, int z, uint timestamp, void* data);
void              evas_event_feed_key_down(Evas* e, char* keyname, char* key, char* string, char* compose, uint timestamp, void* data);
void              evas_event_feed_key_up(Evas* e, char* keyname, char* key, char* string, char* compose, uint timestamp, void* data);
void              evas_event_feed_hold(Evas* e, int hold, uint timestamp, void* data);

void              evas_object_focus_set(Evas_Object* obj, Evas_Bool focus);
Evas_Bool         evas_object_focus_get(Evas_Object* obj);

Evas_Object*      evas_focus_get(Evas* e);

Evas_Modifier*    evas_key_modifier_get(Evas* e);
Evas_Lock*        evas_key_lock_get(Evas* e);

Evas_Bool         evas_key_modifier_is_set(Evas_Modifier* m, char* keyname);

Evas_Bool         evas_key_lock_is_set(Evas_Lock* l, char* keyname);

void              evas_key_modifier_add(Evas* e, char* keyname);
void              evas_key_modifier_del(Evas* e, char* keyname);
void              evas_key_lock_add(Evas* e, char* keyname);
void              evas_key_lock_del(Evas* e, char* keyname);

void              evas_key_modifier_on(Evas* e, char* keyname);
void              evas_key_modifier_off(Evas* e, char* keyname);
void              evas_key_lock_on(Evas* e, char* keyname);
void              evas_key_lock_off(Evas* e, char* keyname);

Evas_Modifier_Mask evas_key_modifier_mask_get(Evas* e, char* keyname);

Evas_Bool         evas_object_key_grab(Evas_Object* obj, char* keyname, Evas_Modifier_Mask modifiers, Evas_Modifier_Mask not_modifiers, Evas_Bool exclusive);
void              evas_object_key_ungrab(Evas_Object* obj, char* keyname, Evas_Modifier_Mask modifiers, Evas_Modifier_Mask not_modifiers);

void              evas_object_pass_events_set(Evas_Object* obj, Evas_Bool pass);
Evas_Bool         evas_object_pass_events_get(Evas_Object* obj);
void              evas_object_repeat_events_set(Evas_Object* obj, Evas_Bool repeat);
Evas_Bool         evas_object_repeat_events_get(Evas_Object* obj);
void              evas_object_propagate_events_set(Evas_Object* obj, Evas_Bool prop);
Evas_Bool         evas_object_propagate_events_get(Evas_Object* obj);
void              evas_object_pointer_mode_set(Evas_Object* obj, Evas_Object_Pointer_Mode setting);
Evas_Object_Pointer_Mode evas_object_pointer_mode_get(Evas_Object* obj);

void              evas_object_precise_is_inside_set(Evas_Object* obj, Evas_Bool precise);
Evas_Bool         evas_object_precise_is_inside_get(Evas_Object* obj);

void              evas_object_event_callback_add(Evas_Object* obj,
						 Evas_Callback_Type type,
						 void function(void* data, Evas* e, Evas_Object* obj, void* event_info) callback,
						 void* data);
void*             evas_object_event_callback_del(Evas_Object* obj,
						 Evas_Callback_Type type,
						 void function(void* data, Evas* e, Evas_Object* obj, void* event_info) callback);

int               evas_async_events_fd_get();
int               evas_async_events_process();
Evas_Bool         evas_async_events_put(void* target, Evas_Callback_Type type, void* event_info, void function(void* target, Evas_Callback_Type type, void* event_info) callback);

void              evas_object_intercept_show_callback_add(Evas_Object* obj, void function(void* data, Evas_Object* obj) callback,  void* data);
void*             evas_object_intercept_show_callback_del(Evas_Object* obj, void function(void* data, Evas_Object* obj) callback);
void              evas_object_intercept_hide_callback_add(Evas_Object* obj, void function(void* data, Evas_Object* obj) callback,  void* data);
void*             evas_object_intercept_hide_callback_del(Evas_Object* obj, void function(void* data, Evas_Object* obj) callback);
void              evas_object_intercept_move_callback_add(Evas_Object* obj, void function(void* data, Evas_Object* obj, Evas_Coord x, Evas_Coord y) callback,  void* data);
void*             evas_object_intercept_move_callback_del(Evas_Object* obj, void function(void* data, Evas_Object* obj, Evas_Coord x, Evas_Coord y) callback);
void              evas_object_intercept_resize_callback_add(Evas_Object* obj, void function(void* data, Evas_Object* obj, Evas_Coord w, Evas_Coord h) callback,  void* data);
void*             evas_object_intercept_resize_callback_del(Evas_Object* obj, void function(void* data, Evas_Object* obj, Evas_Coord w, Evas_Coord h) callback);
void              evas_object_intercept_raise_callback_add(Evas_Object* obj, void function(void* data, Evas_Object* obj) callback,  void* data);
void*             evas_object_intercept_raise_callback_del(Evas_Object* obj, void function(void* data, Evas_Object* obj) callback);
void              evas_object_intercept_lower_callback_add(Evas_Object* obj, void function(void* data, Evas_Object* obj) callback,  void* data);
void*             evas_object_intercept_lower_callback_del(Evas_Object* obj, void function(void* data, Evas_Object* obj) callback);
void              evas_object_intercept_stack_above_callback_add(Evas_Object* obj, void function(void* data, Evas_Object* obj, Evas_Object* above) callback,  void* data);
void*             evas_object_intercept_stack_above_callback_del(Evas_Object* obj, void function(void* data, Evas_Object* obj, Evas_Object* above) callback);
void              evas_object_intercept_stack_below_callback_add(Evas_Object* obj, void function(void* data, Evas_Object* obj, Evas_Object* below) callback,  void* data);
void*             evas_object_intercept_stack_below_callback_del(Evas_Object* obj, void function(void* data, Evas_Object* obj, Evas_Object* below) callback);
void              evas_object_intercept_layer_set_callback_add(Evas_Object* obj, void function(void* data, Evas_Object* obj, int l) callback,  void* data);
void*             evas_object_intercept_layer_set_callback_del(Evas_Object* obj, void function(void* data, Evas_Object* obj, int l) callback);
void              evas_object_intercept_color_set_callback_add(Evas_Object* obj, void function(void* data, Evas_Object* obj, int r, int g, int b, int a) callback,  void* data);
void*             evas_object_intercept_color_set_callback_del(Evas_Object* obj, void function(void* data, Evas_Object* obj, int r, int g, int b, int a) callback);
void              evas_object_intercept_clip_set_callback_add(Evas_Object* obj, void function(void* data, Evas_Object* obj, Evas_Object* clip) callback,  void* data);
void*             evas_object_intercept_clip_set_callback_del(Evas_Object* obj, void function(void* data, Evas_Object* obj, Evas_Object* clip) callback);
void              evas_object_intercept_clip_unset_callback_add(Evas_Object* obj, void function(void* data, Evas_Object* obj) callback,  void* data);
void*             evas_object_intercept_clip_unset_callback_del(Evas_Object* obj, void function(void* data, Evas_Object* obj) callback);

/* Evas utility routines for color space conversions */
/* hsv color space has h in the range 0.0 to 360.0, and s,v in the range 0.0 to 1.0 */
/* rgb color space has r,g,b in the range 0 to 255 */
void              evas_color_hsv_to_rgb(float h, float s, float v, int* r, int* g, int* b);
void              evas_color_rgb_to_hsv(int r, int g, int b, float* h, float* s, float* v);

/* argb color space has a,r,g,b in the range 0 to 255 */
void              evas_color_argb_premul(int a, int* r, int* g, int* b);
void              evas_color_argb_unpremul(int a, int* r, int* g, int* b);

void              evas_data_argb_premul(uint* data, uint len);
void              evas_data_argb_unpremul(uint* data, uint len);

/* Evas imaging api - exports some of the comon gfx engine routines */
/* this is not complete and should be considered experimental. use at your */
/* own risk */

Evas_Imaging_Image* evas_imaging_image_load(char* file, char* key);
void                evas_imaging_image_free(Evas_Imaging_Image* im);
void                evas_imaging_image_size_get(Evas_Imaging_Image* im, int* w, int* h);
Evas_Bool           evas_imaging_image_alpha_get(Evas_Imaging_Image* im);
void                evas_imaging_image_cache_set(int bytes);
int                 evas_imaging_image_cache_get();

void                    evas_imaging_font_hinting_set(Evas_Font_Hinting_Flags hinting);
Evas_Font_Hinting_Flags evas_imaging_font_hinting_get();
Evas_Bool               evas_imaging_font_hinting_can_hint(Evas_Font_Hinting_Flags hinting);

Evas_Imaging_Font* evas_imaging_font_load(char* file, char* key, int size);
void               evas_imaging_font_free(Evas_Imaging_Font* fn);
int                evas_imaging_font_ascent_get(Evas_Imaging_Font* fn);
int                evas_imaging_font_descent_get(Evas_Imaging_Font* fn);
int                evas_imaging_font_max_ascent_get(Evas_Imaging_Font* fn);
int                evas_imaging_font_max_descent_get(Evas_Imaging_Font* fn);
int                evas_imaging_font_line_advance_get(Evas_Imaging_Font* fn);
void               evas_imaging_font_string_advance_get(Evas_Imaging_Font* fn, char* str, int* x, int* y);
void               evas_imaging_font_string_size_query(Evas_Imaging_Font* fn, char* str, int* w, int* h);
int                evas_imaging_font_string_inset_get(Evas_Imaging_Font* fn, char* str);
int                evas_imaging_font_string_char_coords_get(Evas_Imaging_Font* fn, char* str, int pos, int* cx, int* cy, int* cw, int* ch);
int                evas_imaging_font_string_char_at_coords_get(Evas_Imaging_Font* fn, char* str, int x, int y, int* cx, int* cy, int* cw, int* ch);

void               evas_imaging_font_cache_set(int bytes);
int                evas_imaging_font_cache_get();
}
